package com.springdoor.common.core.domain.entity;

import com.springdoor.common.annotation.Excel;
import com.springdoor.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 商品类型对象 sprd_goods_type
 *
 * @author ruoyi
 * @date 2024-05-10
 */
public class SprdGoodsType extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 类型id */
    private Long gTypeId;

    /** 父类型id */
    private Long parentId;

    /** 类型名称 */
    @Excel(name = "类型名称")
    private String gTypeName;

    /** 分类图片 */
    private String image;

    /** 首页分类 */
    @Excel(name = "首页分类")
    private String homeShow;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    private Long orderNum;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    private Long[] attrIds;

    private List<SprdGoodsType> children = new ArrayList<>();

    public void setgTypeId(Long gTypeId)
    {
        this.gTypeId = gTypeId;
    }

    public Long getgTypeId()
    {
        return gTypeId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }
    public void setgTypeName(String gTypeName)
    {
        this.gTypeName = gTypeName;
    }

    public String getgTypeName()
    {
        return gTypeName;
    }
    public void setOrderNum(Long orderNum)
    {
        this.orderNum = orderNum;
    }

    public Long getOrderNum()
    {
        return orderNum;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public Long[] getAttrIds() {
        return attrIds;
    }

    public void setAttrIds(Long[] attrIds) {
        this.attrIds = attrIds;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getHomeShow() {
        return homeShow;
    }

    public void setHomeShow(String homeShow) {
        this.homeShow = homeShow;
    }

    public List<SprdGoodsType> getChildren() {
        return children;
    }

    public void setChildren(List<SprdGoodsType> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("gTypeId", getgTypeId())
            .append("parentId", getParentId())
            .append("gTypeName", getgTypeName())
            .append("image", getImage())
            .append("homeShow", getHomeShow())
            .append("orderNum", getOrderNum())
            .append("delFlag", getDelFlag())
            .append("remark", getRemark())
            .toString();
    }
}
